import React from "react";

export default class ClassComponent extends React.Component {

  showMsg = () => {
    alert("关注了"+ this.props.user)
  }

  hanleClick = () => {
    setTimeout(this.showMsg, 3000)
  }

  render() {
    return (
      <div>
        <button onClick={this.hanleClick}>类组件的关注</button>
      </div>
    );
  }
}
